<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
		<title>评论 -- Powered by CentIMS {$core_version}</title>
		<link href="{'bootstrap/css/bootstrap.css'|shared}" rel="stylesheet"/>
		<link href="{'bootstrap/css/bootstrap-responsive.css'|shared}" rel="stylesheet"/>
		<link href="{'common.css'|shared}" rel="stylesheet"/>
	</head>
	<body>
		<div class="workspace">
			{include file='core/views/vfs/vfs_navi.tpl'}	
			
			<div class="tabbable tabs-left">
				<ul class="nav nav-tabs" style="min-height:350px;">					
					<li class="{if $status == 'new'}active{/if}">
						<a href="."><i class="icon-comment"></i>最新评论({$new_total})</a>
					</li>
					<li class="{if $status == 'pass'}active{/if}">
						<a href="./?status=pass" class="tgre"><i class="icon-thumbs-up"></i>已批准({$pass_total})</a>
					</li>
					<li class="{if $status == 'unpass'}active{/if}">
						<a href="./?status=unpass" class="torg"><i class="icon-thumbs-down"></i>未批准({$unpass_total})</a>
					</li>
					<li class="{if $status == 'spam'}active{/if}">
						<a href="./?status=spam" class="torg"><i class="icon-volume-off"></i>垃圾评论({$spam_total})</a>
					</li>
					<li class="{if $status == 'deleted'}active{/if}">
						<a href="./?status=deleted" class="tred"><i class="icon-trash"></i>回收站({$deleted_total})</a>
					</li>
				</ul>
				<div class="tab-content" style="padding-bottom:200px;">
					
					{if $page_tip_info}
				    <div class="alert alert-info">
				        <button class="close" data-dismiss="alert">×</button>
				        {$page_tip_info}
			      	</div>
			      	{/if}			      	
			      	
					<div class="control-group pull-left">
						<div class="btn-group">
							<button class="btn btn-selectall"><i class="icon-check"></i>全选/反选</button>
					       	<a class="btn dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
					       	<ul class="dropdown-menu">
					           	{'get_comment_bench_options'|fire:$status}
					       	</ul>
					    </div>
					</div>
					
					<div class="pull-right txt-ar">
						<form class="form-inline" method="get" action="./?status={$status}">
							<input type="text" class="input-small" name="page_id" value="{$page_id}" placeholder="页面ID"/>					    
						    <input type="text" class="input-medium" name="key" value="{$key}" placeholder="搜索词"/>				    	    
						    <button type="submit" class="btn"><i class="icon-search"></i>搜索</button>
					    </form>
				    </div>				    		    
				    <br class="clear"/>	
				    	
				    <table id="comment-list" class="table table-striped table-bordered table-condensed">
						<thead>
							<tr>
								<th class="col_chk"><input type="checkbox"/></th>								
								<th class="w200">{'作者'|sorth:author:$curl}</th>
								<th class="wa">{'评论'|sorth:create_time:$curl}</th>
								<th class="w120">{'回应给'|sorth:page_id:$curl}</th>
							</tr>
						</thead>
						<tbody>
							{foreach from=$items item=item}
							<tr>
								<td class="col_chk"><input type="checkbox" value="{$item.comment_id}"/></td>								
								<td class="author-td">
									<img class="avator"/>
									<div class="author">
										{if $item.author}
										<strong>{$item.author}</strong>										
										{/if}
										{if $item.email}
										<br/>
										<a href="mailto:{$item.email}" title="{$item.email}">{$item.email|truncate:30}</a>
										{/if}
										{if $item.url}
										<br/>
										<a href="{$item.url}" target="_blank" title="{$item.url}">{$item.url|truncate:30}</a>
										{/if}
									</div>									
									<span class="label label-info">{$item.source_ip}</span>							
								</td>
								<td class="has-row-actions">
									<div class="sbt-info mgb10">
										<span class="label mg-r5">提交于</span>
										<a href="{$item.page_url|base}#comment-{$item.comment_id}" target="_blank">
										{$item.create_time|date_format:'%Y-%m-%d %H:%M'}
										</a>
										{if $item.reply_id}
										<span class="label label-warning mg-r5">回复给</span>
										<a href="{$item.page_url|base}#comment-{$item.reply_id}" target="_blank">
										{$item.reply_author}
										</a>
										{/if}
									</div>
									<p>{$item.comment|nl2br}</p>
									<div class="row-actions">{'get_comment_operations'|fire:$item}</div>
								</td>
								<td><a href="{$item.page_url|base}" title="{$item.page_title}" target="_blank">{$item.page_title|truncate:24}</a></td>								
							</tr>
							{foreachelse}
							<tr>
								<td colspan="5" class="txt-ac">无评论</td>						
							</tr>
							{/foreach}
						</tbody>
					</table>
					
					<div class="form-horizontal">
						<div class="control-group pull-left">
							<div class="btn-group">
								<button class="btn btn-selectall"><i class="icon-check"></i>全选/反选</button>
					          	<a class="btn dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
					          	<ul class="dropdown-menu">
					            	{'get_comment_bench_options'|fire:$status}
					          	</ul>
					    	</div>
						</div>
						<div class="pagination pull-right">
							{$curl|paging:$totalCount:$limit:'start'}
					    </div>
				    </div>
				    <br class="clear"/>					
					
				</div>
			</div>				
		</div>
		<script type="text/javascript" src="{'jquery-1.7.1.js'|jquery}"></script>
		<script type="text/javascript" src="{'bootstrap/bootstrap.js'|shared}"></script>
		<script type="text/javascript" src="{'common.js'|shared}"></script>		
		<script type="text/javascript" src="comment.js"></script>
	</body>
</html>
